#include<iostream>
using namespace std;
int main(){
    int n;
    while (cin>>n&&n<30&&n>1)
    {
        int sum=1;
        for(int i=0;i<n-1;i++){
            sum=(sum+1)*2;
        }
        cout<<sum<<endl;
    }
    
}